package com.coincalf.feign;

import com.coincalf.dto.TurnoverDataDTO;
import com.coincalf.feign.hystrix.TradeTurnoverOrderServiceClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @Description:
 * @Author: Chen Long
 * @Date: Created in 2018/5/15 下午7:27
 * @Modified by: Chen Long
 */
@FeignClient(value = "coincalf-service", fallback = TradeTurnoverOrderServiceClientFallback.class)
public interface TradeTurnoverOrderServiceClient {

    /**
     * 获取成交数据
     * @param marketId 交易对ID
     * @return
     */
    @RequestMapping(value = "/trade/order/turnover/{marketId}", method = RequestMethod.GET)
    TurnoverDataDTO turnoverData(@PathVariable("marketId") long marketId);
}
